/*
 * @Author: wenqingwu 18417432@qq.com
 * @Date: 2023-07-11 14:23:40
 * @LastEditors: wenqingwu 18417432@qq.com
 * @LastEditTime: 2023-07-11 14:48:48
 * @FilePath: \w325coding-react\day104\router-v5\src\home\HomeView.jsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import React from 'react';
import { Link } from 'react-router-dom';
import { renderRoutes } from 'react-router-config';
const HomeView = (props) => {
  console.log(props) // {history,location,match, route:{auth, component, routes,path}}
  return (
    <div>
      <h1>HomeView</h1>
      <ul>
        <li>
          <Link to={`${props.match.path}/qx`}>权限管理</Link>
        </li>
        <li>
          <Link to={`${props.match.path}/yh`}>用户管理</Link>
        </li>
      </ul>
      <div>
        {renderRoutes(props.route.routes)}
      </div>
    </div>
  );
}

export default HomeView;
